package net.neptech.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.neptech.mapper.WorkflowStarterMapper;
import net.neptech.model.workflow.WorkflowStarter;
import net.neptech.repository.WorkflowStarterRepo;
import net.neptech.service.StarterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Saya
 * @Date 2025/8/19 12:17
 * @Description TODO
 **/
@Service
public class StarterServiceImpl extends ServiceImpl<WorkflowStarterMapper,WorkflowStarter> implements StarterService {

    @Autowired
    private WorkflowStarterRepo workflowStarterRepo;

    @Override
    public List<WorkflowStarter> getByFlowId(String flowId){
        return workflowStarterRepo.findByFlowId(flowId);
    }

    @Override
    public boolean save(WorkflowStarter workflowStarter) {
        workflowStarterRepo.save(workflowStarter);
        return true;
    }
}
